package com.pesilo.module.home.mvc.controller
{
	import org.puremvc.as3.multicore.interfaces.IFacade;
	import org.puremvc.as3.multicore.patterns.facade.Facade;

	public class ApplicationFacade extends Facade implements IFacade
	{
		public static const NAME:String="HomeModuleApp";
		public static const STARTUP:String="startupEvent";
		public static const EVENT_SHOW:String="showEvent";
		public static const EVENT_HIDE:String="hideEvent";
		
		
		public function ApplicationFacade(key:String)
		{
			super(key);
		}
		
		public static function getInstance(key:String):ApplicationFacade{
			if(instanceMap[key]==null)instanceMap[key]=new ApplicationFacade(key);
			return instanceMap[key] as ApplicationFacade;
		}
		
		override protected function initializeController():void{
			super.initializeController();
			registerCommand(STARTUP,ApplicationStartupCommand);
		}
		
		public function startup(app:*):void{
			sendNotification(STARTUP,app);
		}
	}
}